﻿using RpcSync.Model;
using RpcSync.Model.DB;
using SqlSugarHelper;

namespace RpcSync.DAL.Repository
{
    internal class ServerGroupDAL : IServerGroupDAL
    {
        private readonly IRepository<ServerGroupModel> _BasicDAL;
        public ServerGroupDAL(IRepository<ServerGroupModel> dal)
        {
            _BasicDAL = dal;
        }
        public ServerGroup[] GetServerGroup()
        {
            return this._BasicDAL.GetAll(a => new ServerGroup
            {
                Id = a.Id,
                TypeVal = a.TypeVal
            });
        }
    }
}
